package com.teemor.blog.service.impl;

import com.teemor.blog.entity.TbArticleExtend;
import com.teemor.blog.entity.condition.TbArticleExtendCondition;
import com.teemor.blog.mapper.TbArticleExtendMapper;
import com.teemor.blog.service.IArticleExtendService;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ArticleExtendServiceImpl implements IArticleExtendService {
    @Autowired
    private TbArticleExtendMapper tbArticleExtendMapper;

    public int countArticleExtend(TbArticleExtendCondition condition) {
        return tbArticleExtendMapper.countArticleExtendByCondition(condition);
    }

    public List<TbArticleExtend> qryArticleExtends(TbArticleExtendCondition condition) {
        return tbArticleExtendMapper.selectArticleExtendByCondition(condition);
    }

    public TbArticleExtend qryArticleExtendById(Integer atcId) {
        return tbArticleExtendMapper.selectArticleExtendByAtcId(atcId);
    }

    public int addArticleExtend(TbArticleExtend inParam) {
        return tbArticleExtendMapper.insertArticleExtend(inParam);
    }

    public int updArticleExtendById(TbArticleExtend inParam) {
        return tbArticleExtendMapper.updateArticleExtendByAtcId(inParam);
    }
}